package com.spring.sunflower.common;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.spring.sunflower.R;
import com.spring.sunflower.bean.BlackListBean;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * Created by Kevin on 2021/7/15<br/>
 * <p>
 * Describe:<br/>
 */
public class BlackListAdapter extends BaseQuickAdapter<BlackListBean.DatasBean, BaseViewHolder> {
    public BlackListAdapter(int layoutResId, @Nullable List<BlackListBean.DatasBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, BlackListBean.DatasBean bean) {
        Glide.with(getContext())
                .load(bean.getPhoto())
                .into((ImageView) holder.getView(R.id.ivCover));
        holder.setText(R.id.tvName, bean.getNickname());
    }
}
